package main

import (
	"fmt"
	"os"

	"gitee.com/libbylg/pkgr/repo"
)

// CmdEncode 编码
// pkgr encode token
func CmdEncode(argv []string) int {
	if len(argv) != 3 {
		ERROR("Missing parameters, try -h help")
		return 1
	}

	token := argv[2]

	fmt.Fprintf(os.Stdout, "%v", repo.TokenEncode(token))

	return 0
}
